package com.wc.codeforces.数学.mex.Informatics_in_MAC;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.StringTokenizer;

/**
 * @Author congge
 * @Date 2024/6/24 10:05
 * @description https://www.luogu.com.cn/problem/CF1935B
 */
public class Main {
    /**
     * 思路：mex的性质, 整体的mex是mx, 那分成k份如果能完成, 每一段里面的mex也是mx
     * 所以我们只需要分成两段即可
     * 步骤：
     * 1、求出整体的mex
     * 2、求最小前缀满足前缀段是mex的
     * 3、判断后缀的段是否为mex
     * 4、结束
     */
    static FastReader sc = new FastReader();
    static PrintWriter out = new PrintWriter(System.out);
    static int N = 100010;
    static int[] a = new int[N];
    static boolean[] vis = new boolean[N];
    static int n;

    public static void main(String[] args) {
        int T = sc.nextInt();
        while (T-- > 0) {
            n = sc.nextInt();
            Arrays.fill(vis, 0, n, false);
            for (int i = 1; i <= n; i++) {
                a[i] = sc.nextInt();
                vis[a[i]] = true;
            }
            int mex = 0;
            while (vis[mex]) mex++;
            Arrays.fill(vis, 0, n, false);
            int sum = -1;
            int j = 0;
            for (int i = 1; i <= n; i++) {
                if (!vis[a[i]] && a[i] < mex) sum++;
                vis[a[i]] = true;
                if (sum == mex - 1) {
                    j = i + 1;
                    break;
                }
            }
            Arrays.fill(vis, 0, n, false);
            sum = -1;
            for(int i = j; i <= n; i++){
                if (!vis[a[i]] && a[i] < mex) sum++;
                vis[a[i]] = true;
                if (sum == mex - 1) {
                    break;
                }
            }
            if (sum == mex - 1) {
                out.println(2);
                out.println(1 + " " + (j - 1));
                out.println(j + " " + n);
            } else out.println(-1);
        }
        out.flush();
    }
}

class FastReader {
    StringTokenizer st;
    BufferedReader br;

    FastReader() {
        br = new BufferedReader(new InputStreamReader(System.in));
    }

    String next() {
        while (st == null || !st.hasMoreElements()) {
            try {
                st = new StringTokenizer(br.readLine());
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
        return st.nextToken();
    }

    int nextInt() {
        return Integer.parseInt(next());
    }

    String nextLine() {
        String s = "";
        try {
            s = br.readLine();
        } catch (IOException e) {
            e.printStackTrace();
        }
        return s;
    }

    long nextLong() {
        return Long.parseLong(next());
    }

    double nextDouble() {
        return Double.parseDouble(next());
    }

    // 是否由下一个
    boolean hasNext() {
        while (st == null || !st.hasMoreTokens()) {
            try {
                String line = br.readLine();
                if (line == null)
                    return false;
                st = new StringTokenizer(line);
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }
        return true;
    }
}